// d:\project\honey-Alliance-project\shenye-dy-applet\components\login-popup\login-popup.js
Component({
  data: {

  },
  properties: {
    title: { //loading结束文案
      type: String,
      value: "提示"   // top center bottom
    },
    content: { //loading结束文案
      type: String,
      value: "该功能需要登录进行查看"   // top center bottom
    },
    cancelText: { //loading结束文案
      type: String,
      value: "取消"   // top center bottom
    },
    confirmText: { //loading结束文案
      type: String,
      value: "去登录"   // top center bottom
    },
  },
  methods: {
    openPopup(){
       this.open('loginPopup')
    },
    closePopup(){
      this.close('loginPopup')
    },
    // 取消
    cancel(){
      this.close('loginPopup')
      this.triggerEvent('cancel')
    },
    // 确认
    confirm(){
      this.close('loginPopup')
      this.triggerEvent('confirm')
    },
    // 打开弹窗
    open(popupName) {
      const childComponent = this.selectComponent('#'+popupName);
      childComponent.open();
    },
    // 关闭弹窗
    close(popupName) {
      const childComponent = this.selectComponent('#'+popupName);
      childComponent.close();
    },
  }
})